package org.aksw.xoperator.security;

import org.aksw.xoperator.sparql.p2p.SPARQLQueryOverXmpp;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.Packet;

public interface IAccessControl {
	/**
	 * 
	 * Validates if the message is ok to process
	 * 
	 * @param message the message to decide
	 * @return true if further processing is ok
	 */
	public boolean allow(Message message);
	
	
	/**
	 * validates if the p2p query is ok to process
	 * 
	 * 
	 * @param query the query to decide
	 * @return true if further processing is ok
	 */
	public boolean allow(SPARQLQueryOverXmpp query);
	
	public Message getDenialResponse(Message message);
	
	public IQ getDenialResponse(SPARQLQueryOverXmpp query);

}
